package com.oracle.application.feign;

import com.oracle.application.feign.vo.Book;
import com.oracle.application.feign.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "cloud-service-book",path = "/books")
public interface BooksFeign {
    @GetMapping("/getBookName")
    public R getBooksByName(@RequestParam("bookName") String bookName);

    @GetMapping("/list")
    public R list();

    @PostMapping("/addBook")
    public R add(@RequestBody Book book);

    @PutMapping("/update")
    public R update(@RequestBody Book book);

    @DeleteMapping("/deleteById")
    public R delete(@RequestParam("id") Integer id);

}
